Systems and methods for determining proper phase rotation in downhole linear motors

ABSTRACT

Systems and methods for determining proper phase rotation in a linear motor that may be used in an ESP system, where the phase rotations associated with power and return strokes are initially unknown. The method includes providing power to the motor for multiple cycles and monitoring the load (e.g., by monitoring current drawn by the motor) on the motor to determine in which direction (phase rotation) the load on the motor increases. This direction corresponds to the power stroke of the motor. The direction of increasing load is then associated with the power stroke and the motor is operated normally.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional PatentApplication 62/181,299, filed Jun. 18, 2015 by Renato L. Pichilingue,which is incorporated by reference as if set forth herein in itsentirety.

BACKGROUND

Field of the Invention

The invention relates generally to downhole tools for use in wells, andmore particularly to means for determining the proper phase rotation forpower that is supplied to a downhole linear motor.

Related Art

In the production of oil from wells, it is often necessary to use anartificial lift system to maintain the flow of oil. The artificial liftsystem commonly includes an electric submersible pump (ESP) that ispositioned downhole in a producing region of the well. The ESP has amotor that receives electrical power from equipment at the surface ofthe well. The received power drives the motor, which in turn drives apump to lift the oil out of the well.

ESP motors commonly use rotary designs in which a rotor is coaxiallypositioned within a stator and rotates within the stator. The shaft ofthe rotor is coupled to a pump, and drives a shaft of the pump to turnimpellers within the body of the pump. The impellers force the oilthrough the pump and out of the well. While rotary motors are typicallyused, it is also possible to use a linear motor. Instead of a rotor, thelinear motor has a mover that moves in a linear, reciprocating motion.The mover drives a plunger-type pump to force oil out of the well.

In order to properly control a linear motor, it is desirable to know theelectrical position of the mover within the stator. Linear motors mayuse several sensors (e.g., Hall-effect sensors) to determine theelectrical position and absolute position of the mover. The signals fromthese sensors are provided to a control system. Then, based upon theposition of the mover, the drive delivers electrical power to run themotor.

An ESP using a linear motor typically operates on three-phase power.Each phase is carried by a separate conductor, and is typically shiftedby 120 degrees from the other phases. An electrical drive system at thesurface of the well generates the three-phase drive signal that issupplied to the motor, which in turn drives the pump. When the system isinstalled, it is commonly necessary to make various connections (e.g.,cable splices) between the electrical conductors that convey theelectrical power to the motor. It is not unusual for mistakes to be madein these connections, resulting in electrical connections between theelectrical drive system and pump motor that are incorrect. Morespecifically, two or more of the conductors may be switched. Suchmisconnection of the conductors may also occur when maintenance isperformed on the electrical drive system or the cabling.

Because the phasing of a three-phase electrical signal is reversed(e.g., A-B-C becomes C-B-A) when any two of the three wires areswitched, misconnection of these wires can result in the pump motorbeing driven in a direction which is opposite the intended direction. Inother words, when the electrical drive system produces a drive signalwith phasing that is intended to drive the motor in the forwarddirection, it actually drives the motor in the reverse direction. In thecase of a linear motor, the drive's output signal is intended to drivethe upstroke/downstroke of the motor, so if the phase rotation isreversed, the mover will be driven upward when it is intended to bedriven downward, and downward when it is intended to be driven upward.While this may still result in some fluid being produced from the well,it typically is not as efficient as if the proper phasing is used.Additionally, if the motor is intended to be driven in a particularmanner on upward or downward strokes (e.g., faster on the downwardstroke), this will actually occur on the opposite stroke.

It would therefore be desirable to provide improved means fordetermining the phasing at the output of the drive that is associatedwith a linear motor's upstroke and downstroke, and for utilizing thisinformation to generate signals to drive the linear motor.

SUMMARY OF THE INVENTION

This disclosure is directed to systems and methods for determining theproper phase rotation for power that is supplied to a downhole linearmotor that solve one or more of the problems discussed above. Oneparticular embodiment is a method for determining proper phase rotationin a linear motor, such as may be used in an ESP system, where the phaserotations associated with power and return strokes are initiallyunknown. The method includes providing power to a linear motor andthereby driving the motor for multiple cycles. Each cycle includes astroke in which the motor's mover travels in a first direction and astroke in a second, opposite direction. The load on the motor (the forcegenerated by the motor) is monitored during each of the cycles, and itis determined whether the load on the motor increases from cycle tocycle during the strokes in the first direction, or the seconddirection. This may be done from cycle to cycle as averages for thestrokes, or at specific points in the strokes. Because the load isproportional to the current drawn by the motor, the load on the motormay be determined by monitoring the current drawn by the motor. If theload on the motor increases during the strokes in the first direction,this indicates that this stroke is forcing the weight of the increasingcolumn of fluid out of the well. The first direction is thereforeassociated with the power stroke and the second direction is associatedwith the return stroke. If, on the other hand, the load on the motorremains substantially constant during the strokes in the firstdirection, and increases during the strokes in the second direction, thefirst direction is associated with the return stroke and the seconddirection is associated with the power stroke. This method may be usedin a startup phase of operation. For instance, after an ESP system hasbeen installed in a well, or after repairs have been made to the system,it may be necessary to start the motor without knowing whether thephases of the power cable have been correctly connected to the motor.Because these connections are not known, associating the directions withthe respective power and return strokes may consist of associating thephase rotations of the generated power with the power and returnstrokes. After the directions (phase rotations) are associated with thepower and return strokes, monitoring of the load on the motor can bediscontinued, and the system may proceed to run the motor normally.

An alternative embodiment comprises an apparatus for determining properphase rotation in a linear motor. The apparatus comprises a controllerof an electric drive system for the motor. In a startup phase ofoperation, the controller is configured to control the electric drive toprovide power to the motor. The power drives the motor for some numberof cycles, where each cycle includes a stroke in a first direction and astroke in a second, opposite direction. The number of cycles may bepredetermined. The controller monitors the load on the motor during eachstroke of each cycle, such as by monitoring the current drawn by themotor (which is proportional to the load). The controller thendetermines which of the first and second directions corresponds to anincreasing load on the motor and which of the directions corresponds tosubstantially constant load. The controller may compare loads for eachsuccessive cycle, first and last cycles, etc., and may compare averageloads for the respective strokes, loads at specific points in thestrokes, and so forth. Whichever of the directions corresponds to anincreasing load over the multiple cycles is the direction of the powerstroke. The controller therefore associates this direction with thepower stroke and associates the opposite direction with the returnstroke. The association may be made in a variety of ways, such as bystoring corresponding in a memory of the controller. After thecontroller determines which of the directions or phase rotationscorrespond to the power and return strokes, the controller may controlthe electric drive to operate the motor normally.

Another alternative embodiment comprises a system that includes anelectric drive, an ESP and a power cable that couples a linear motor ofthe ESP to the electric drive. In a startup phase of operation, theelectric drive provides power to the motor for some number of cycles,where each cycle includes a stroke in a first direction and a stroke ina second, opposite direction. Each direction corresponds to a differentphase rotation. The electric drive monitors the load on the motor duringeach stroke of each cycle (e.g., by monitoring the current drawn by themotor) and determines which of the first and second directions (andphase rotations) corresponds to an increasing load on the motor. Strokesin the opposite direction (and opposite phase rotation) shouldexperience a substantially constant load. The electric drive comparesthe loads for multiple cycles to determine which direction and phasesrotation corresponds to an increasing load over the multiple cycles.This is the direction (and phase rotation) of the power stroke, so theelectric drive associates this direction with the power stroke andassociates the opposite direction with the return stroke. Theassociation may be made in a variety of ways, such as by storingcorresponding in a memory in the electric drive. After the electricdrive determines which of the directions or phase rotations correspondto the power and return strokes, the drive may operate the motornormally.

Numerous other embodiments are also possible.

BRIEF DESCRIPTION OF THE DRAWINGS

Other objects and advantages of the invention may become apparent uponreading the following detailed description and upon reference to theaccompanying drawings.

FIG. 1 is a diagram illustrating an exemplary pump system in accordancewith one embodiment.

FIG. 2 is a diagram illustrating an exemplary linear motor in accordancewith one embodiment which would be suitable for use in the pump systemof FIG. 1.

FIGS. 3A and 3B are functional block diagrams illustrating the structureof control systems for a linear motors in accordance with two exemplaryembodiments.

FIG. 4 is a flow diagram illustrating a method for determining whether aphase rotation is associated with a power stroke or return stroke of alinear motor in accordance with one embodiment.

While the invention is subject to various modifications and alternativeforms, specific embodiments thereof are shown by way of example in thedrawings and the accompanying detailed description. It should beunderstood, however, that the drawings and detailed description are notintended to limit the invention to the particular embodiment which isdescribed. This disclosure is instead intended to cover allmodifications, equivalents and alternatives falling within the scope ofthe present invention as defined by the appended claims. Further, thedrawings may not be to scale, and may exaggerate one or more componentsin order to facilitate an understanding of the various featuresdescribed herein.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

One or more embodiments of the invention are described below. It shouldbe noted that these and any other embodiments described below areexemplary and are intended to be illustrative of the invention ratherthan limiting.

As described herein, various embodiments of the invention comprisesystems and methods for determining the phase voltage rotation (A-B-C orC-B-A) of an electric drive system that is required to drive a linearmotor in a desired direction. (“Direction” as used here refers to thedirection of motion of the mover which, in a vertically oriented motoris either upward or downward.)

Generally speaking, in the present systems and methods, a controller ofan electric drive system generates an output voltage having a knownphase rotation, and this output voltage is provided to a linear motor todrive the mover in a first direction. It does not matter whether theoutput phase rotation drives the upstroke or downstroke of the motor. Atthe end of the stroke, the phase rotation is reversed to drive the moverin the opposite direction. This is repeated for several cycles, whereeach cycle includes a stroke in each direction. As each stroke isperformed, the controller for the drive monitors the current drawn bythe motor. The current is an indication of the amount of force that isgenerated by the motor, which in turn corresponds to the load on themotor. In one direction, the amount of current drawn by the motor willincrease from one cycle to the next. This direction corresponds to thepower stroke of the motor, which requires more force as a column offluid is generated in the production tubing. In the other direction, theamount of current drawn by the motor will remain essentially constant.This direction corresponds to the return stroke, which requires the sameamount of force to draw fluid into the pump on each cycle. Once thepower stroke and return stroke have been identified from thecycle-to-cycle differences in current, the corresponding phase rotationsare associated with the respective strokes, and the motor is operatednormally.

Referring to FIG. 1, a diagram illustrating an exemplary pump system inaccordance with one embodiment of the present invention is shown. Awellbore 130 is drilled into an oil-bearing geological structure and iscased. The casing within wellbore 130 is perforated in a producingregion of the well to allow oil to flow from the formation into thewell. Pump system 120 is positioned in the producing region of the well.Pump system 120 is coupled to production tubing 150, through which thesystem pumps oil out of the well. A control system 110 is positioned atthe surface of the well. Control system 110 is coupled to pump 120 bypower cable 112 and a set of electrical data lines 113 that may carryvarious types of sensed data and control information between thedownhole pump system and the surface control equipment. Power cable 112and electrical lines 113 run down the wellbore along tubing string 150.

Pump 120 includes an electric motor section 121 and a pump section 122.In this embodiment, an expansion chamber 123 and a gauge package 124 areincluded in the system. (Pump system 120 may include various othercomponents which will not be described in detail here because they arewell known in the art and are not important to a discussion of theinvention.) Motor section 121 receives power from control system 110 anddrives pump section 122, which pumps the oil through the productiontubing and out of the well.

In this embodiment, motor section 121 is a linear electric motor.Control system 110 receives AC (alternating current) input power from anexternal source such as a generator (not shown in the figure), rectifiesthe AC input power, converting it to DC (direct current) voltage of aspecific value as determined by the controller which is then used toproduce three-phase AC output power which is suitable to drive thelinear motor. The output power generated by control system 110 isdependent in part upon the electrical position of the mover within thestator of the linear motor. Electrical position sensors in the motorsense the position of the mover and communicate this information viaelectrical lines 113 to control system 110 so that that electricalcurrents are properly and timely commutated (as will be discussed inmore detail below). The output power generated by control system 110 isprovided to pump system 120 via power cable 112.

Referring to FIG. 2, a diagram illustrating an exemplary linear motorwhich would be suitable for use in the pump system of FIG. 1 is shown.The linear motor has a cylindrical stator 210 which has a bore in itscenter. A base 211 is connected to the lower end of stator 210 toenclose the lower end of the bore, and a head 212 is connected to theupper end of the stator. Motor head 212 has an aperture therethrough toallow the shaft 222 of the mover 220 to extend to the pump. In thisembodiment, the pump is configured to draw fluid into the pump on theupstroke and expel the fluid on the downstroke. In other words, thedownstroke is the power stroke and the upstroke is the return stroke.

Stator 210 has a set of windings 213 of magnet wire. Windings 213include multiple separate coils of wire, forming multiple poles withinthe stator. The ends of the windings are coupled (e.g., via a potheadconnector 214) to the conductors of the power cable 218. Although thepower cable has separate conductors that carry the three phase power tothe motor, the conductors are not depicted separately in the figure forpurposes of simplicity and clarity. Similarly, the coils of magnet wireare not separately depicted. The coils may have various differentconfigurations, but are collectively represented as component 213 in thefigure.

The windings are alternately energized by the current received throughthe power cable to generate magnetic fields within the stator. Thesemagnetic fields interact with permanent magnets 221 on the shaft 222 ofmover 220, causing mover 220 to move up and down within the motor. Thewaveform of the signal provided by the drive via the power cable (inthis case a three-phase signal) is controlled to drive mover 220 in areciprocating motion within the bore of stator 210. Stator 210incorporates a set of Hall-effect sensors 215 to monitor the electricalposition of mover 220 within stator 210. The outputs of Hall-effectsensors 215 are transmitted to the controller and can be used todetermine absolute position. They may be transmitted as distinctsignals, or they may be combined to form one or more composite signals.The mover may also be coupled to an absolute encoder of some type, anddata from this encoder may be transmitted to the controller. Thecontroller then tracks the motor position based on the received signals.

Referring to FIG. 3A, a functional block diagram illustrating thestructure of a control system for a linear motor in one embodiment isshown. The control system is incorporated into a drive system (e.g.,110) for the linear motor. The drive system receives AC input power froman external source and generates three-phase output power that isprovided to the linear motor to move the pump. The drive system alsoreceives position information from the linear motor and uses thisinformation when generating the three-phase power for the motor.

As depicted in FIG. 3A, drive system 300 has input and rectifiercircuitry 310 that receives AC input power from the external powersource. The input power may be, for example, 480V, three-phase power.Circuitry 310 converts the received AC power to DC power at a voltagedetermined by the line value and provides this power to a first DC bus.The DC power on the first DC bus is provided to a variable DC-DCconverter 320 that outputs DC power at a desired voltage to a second DCbus. The voltage of the DC power output by DC-DC converter 320 can beadjusted within a range from 0V to the voltage on the first DC bus, asdetermined by a voltage adjustment signal received from motor controller340. The DC power on the second DC bus is input to an inverter 330 whichproduces three-phase output power at a desired voltage and frequency asdetermined by the controller. The output power produced by inverter 330is transmitted to the downhole linear motor via a power cable.

The power output by inverter 330 is monitored by voltage monitor 350.Voltage monitor 350 provides a signal indicating the voltage output byinverter 330 as an input to motor controller 340. Motor controller 340also receives position information from the downhole linear motor. Inone embodiment, this position information consists of the signalsgenerated by the Hall-effect sensors as described above in connectionwith FIG. 2. Motor controller 340 uses the received position informationto determine the position and speed of the mover within the linearmotor. Based upon this position and speed information, as well as theinformation received from voltage monitor 350, controller 340 controlsinverter 330 to generate the appropriate output signal.

In one embodiment, motor controller 340 may control the switching ofinsulated gate bipolar transistors (IGBT's) in inverter 330 to generatea three-phase, 6-step waveform. The three phases of the drive's outputmay be identified as phases A, B and C. As noted above, although thedrive system outputs are known, it is not uncommon for misconnection ofthe conductors between the drive system and the downhole motor to occur.Consequently, although the outputs of the drive system are intended tobe provided to respective inputs of the downhole motor (e.g., output Ato input A′, output B to input B′, and output C to input C′), it is notknown whether this is actually the case. The drive system is thereforeconfigured to identify the phasing at its output that will provide theproper input phasing at the motor.

It is assumed for the purposes of this disclosure that the phasedifferences between the three phases of the drive unit's output signalsare substantially equal. When any two of the phases are switched, theeffect is to reverse the order of the phases. For instance, if thephases on lines A, B and C occur in the order A-B-C, switching thesignals on any two of the lines will result in the phase order C-B-A. Itis therefore assumed that any output signal generated by the drive unitwill have one of these two orders (which may be referred to herein asphasings or phase rotations).

In this embodiment, the controller is configured to generate an outputthat drives the motor for several cycles, alternating between the twophase rotations to cause the motor to perform multiple power strokes andreturn strokes. The controller monitors the current drawn by the motoron each stroke and, based on changes in the current drawn by the motorin each direction, determines which phase rotation drives the powerstroke, and which drives the return stroke. With the phase rotations nowidentified and associated with the respective strokes, the controllerproceeds with normal operation of the motor.

Referring to FIG. 3B, a functional block diagram illustrating analternative structure of a control system for a linear motor is shown.The control system is incorporated into a drive system (e.g., 110) forthe linear motor. The drive system again receives AC input power from anexternal source and generates three-phase output power for the linearmotor. The drive system uses feedback on its voltage and current output,as well as position information from the motor, to control generation ofthe three-phase power for the motor.

As depicted in FIG. 3B, drive system 500 has a variable AC/DC converterthat converts the received AC power to DC. The DC power is provided toDC bus 520. The DC power on bus 520 is used by IGBT inverter 530 toproduce three-phase output power at a desired voltage and frequency asdetermined by controller 540. The output power produced by IGBT inverter530 is transmitted to the downhole linear motor via a power cable.

The power output by IGBT inverter 530 is monitored by voltage andcurrent monitor 550. Monitor 550 provides voltage and currentinformation to motor controller 540. Motor controller 540 also receivesposition information from the position sensors in the downhole linearmotor. Controller 540 uses the received position information todetermine the position and speed of the mover within the linear motor.Based upon the information received by controller 540, IGBT inverter 530is controlled to generate the appropriate output signal. The methodsdescribed above (e.g., in connection with FIG. 4) are implemented incontroller 540 in a manner similar to controller 340 of FIG. 3.

Referring to FIG. 4, a flow diagram illustrating a method in accordancewith one embodiment is shown. In this embodiment, an electric drivewhich is coupled to a downhole electric linear motor generates an outputvoltage in a startup phase of operation that is provided to a downholelinear motor. The output alternates between a first phase rotation(e.g., A-B-C), and a second phase rotation (e.g., C-B-A). The firstphase rotation drives the motor's mover in one direction, and the secondphase rotation drives the mover in the opposite direction. Since,however, it is not known whether the power conductors have been properlyconnected, it is not initially known which phase rotation drives themotor's power stroke, and which drives the return stroke.

The drive is controlled so that it continues to provide its output powerto the downhole linear motor for two or more cycles, where each cycleincludes an upward stroke and a downward stroke (420). The specificnumber of cycles (N) may vary from one embodiment to another. As thepower is provided to the motor, the drive monitors the current drawn bythe motor (430). The current is an indicator of the force that isgenerated by the motor. The drive can therefore effectively monitor theamount of force required for each stroke in each direction.

On the motor's power stroke, the motor drives the pump to force oilupward through the production tubing. When the motor first starts, thesystem has not yet built up a column of fluid in the production tubing,so the pump requires less force to push the fluid through the tubing. Asthe motor continues to operate, the height of the column of fluidincreases, so more force is required to push the fluid upward throughthe production tubing. Consequently, the amount of current drawn on thepower stroke will increase from a lower current at startup to a highercurrent when the system reaches normal operation. On the motor's returnstroke, on the other hand, the amount of current drawn by the motor willremain essentially constant. This is because, on the return stroke, thepump only has to draw oil from the surrounding formation into the pump'sbarrel, rather than push the fluid upward out of the well. The forcerequired to draw the fluid into the pump is substantially the same atstartup as it is during normal operation of the pump, so the currentdrawn by the motor on successive return strokes will not changesignificantly.

After the current drawn by the motor has been monitored for severalcycles, the current for each stroke can be compared from one cycle toanother. This comparison reveals which of the strokes has drawn asubstantially constant current for each cycle, and which of the strokeshas drawn an increasing amount of current for each successive cycle(440). It should be noted that the amount by which the current changesfrom cycle to cycle will decrease, so that it levels out and becomessubstantially constant after some number of cycles. The stroke that hasthe increasing current is then identified as the power stroke (thedownward stroke in the above example), and the stroke that has thesubstantially constant current is identified as the return stroke (theupward stroke in the example) (450). When the power and return strokeshave been identified, the drive associates each stroke with therespective phase rotation which produced that stroke. For example, ifthe A-B-C phase rotation produced the stroke for which the currentincreased over several cycles, this phase rotation is associated withthe power stroke (the forward direction), and C-B-A phase rotation isassociated with the return stroke (the reverse direction). Theassociation of the phase rotation with the power stroke may be made inthe controller in various ways, such as by storing data in a memory,configuring the controller's programming, etc. After it has beendetermined which of the phase rotations is associated with the power andreturn strokes, the drive controls the output power for normal,continuous operation of the motor (460). “Normal” operation refers togenerating and providing signals that drive the mover alternatelythrough repeating cycles of the power and return strokes to producefluids from the well. The power output characteristics intended to beprovided on the power and return strokes may be different, and afterdetermining which of the phase rotations is associated with each of thepower and return strokes, the characteristics intended to be associatedwith each one will be provided on the appropriate stroke.

The benefits and advantages which may be provided by the presentinvention have been described above with regard to specific embodiments.These benefits and advantages, and any elements or limitations that maycause them to occur or to become more pronounced are not to be construedas critical, required, or essential features of any or all of thedescribed embodiments. As used herein, the terms “comprises,”“comprising,” or any other variations thereof, are intended to beinterpreted as non-exclusively including the elements or limitationswhich follow those terms. Accordingly, a system, method, or otherembodiment that comprises a set of elements is not limited to only thoseelements, and may include other elements not expressly listed orinherent to the described embodiment.

While the present invention has been described with reference toparticular embodiments, it should be understood that the embodiments areillustrative and that the scope of the invention is not limited to theseembodiments. Many variations, modifications, additions and improvementsto the embodiments described above are possible. It is contemplated thatthese variations, modifications, additions and improvements fall withinthe scope of the invention as detailed within the present disclosure.

What is claimed is:
 1. An apparatus comprising: a controller of anelectric drive system for a linear motor, wherein in a startup phase ofoperation, the controller is configured to: control the electric drivesystem which provides power to the linear motor, wherein the powerdrives the motor for a plurality of cycles, wherein each cycle includesa stroke in which a mover of the motor moves in a first direction and astroke in which the mover moves in a second direction which is oppositethe first direction; monitor a load on the motor during the plurality ofcycles; determine, for each of the first and second directions, whetherthe load on the motor during the strokes in the corresponding directionincreases over the plurality of cycles; if the load on the motor duringthe strokes in the first direction increases and the load on the motorduring the strokes in the second direction remains substantiallyconstant, associate the first direction with a power stroke andassociating the second direction with a return stroke; if the load onthe motor during the strokes in the second direction increases and theload on the motor during the strokes in the first direction remainssubstantially constant, associate the second direction with the powerstroke and associating the first direction with the return stroke;provide power to the linear motor having respective power outputcharacteristics associated with the power stroke and return stroke. 2.The apparatus of claim 1, wherein the controller controls the electricdrive system to provide power having a first phase rotation which causesthe mover to move in the first direction and power having a second phaserotation which causes the mover to move in the second direction; whereinif the controller determines that the load on the motor during thestrokes in the first direction increases and the load on the motorduring the strokes in the second direction remains substantiallyconstant, the controller associates the first phase rotation with thepower stroke and associates the second phase rotation with the returnstroke; wherein if the controller determines that the load on the motorduring the strokes in the second direction increases and the load on themotor during the strokes in the first direction remains substantiallyconstant, the controller associates the second phase rotation with thepower stroke and associates the first phase rotation with the returnstroke.
 3. The apparatus of claim 1, wherein the controller determinesthe load on the motor during the strokes in each of the first and seconddirections by determining a current drawn by the motor during thestrokes in each of the first and second directions, wherein the load onthe motor is proportional to the current drawn by the motor.
 4. Theapparatus of claim 3, wherein, for each of the first and seconddirections, the controller determines whether the current drawn by themotor during the strokes in the corresponding direction increases overthe plurality of cycles by comparing the current for the stroke in thecorresponding direction in each successive one of the plurality ofcycles.
 5. The apparatus of claim 1, wherein the controller initiallycauses the electric drive system to provide no power to the motor, andthen causes the electric drive system to provide power to the motor in astartup phase of operation, wherein the controller monitors the load onthe motor for a predetermined number of cycles during the startup phase,and wherein after the controller monitors the load on the motor for thepredetermined number of cycles and associates each of the first andsecond directions with the corresponding one of the power and returnstrokes in the startup phase, the controller controls the electric drivesystem to operate the motor normally.
 6. A system comprising: anelectric submersible pump (ESP) system installed in a well, wherein theESP system includes a linear motor; an electric drive system positionedat the surface of the well; and one or more electrical cables coupledbetween the electric drive system and the ESP system, wherein the one ormore electrical cables carry power from the electric drive system to theESP system; wherein the electric drive system includes a controller forthe linear motor of the ESP system; wherein in a startup phase ofoperation, the electric drive system is configured to provide power tothe linear motor, wherein the power drives the motor for a plurality ofcycles, wherein each cycle includes a stroke in which a mover of themotor moves in a first direction and a stroke in which the mover movesin a second direction which is opposite the first direction, monitor aload on the motor during the plurality of cycles, determine, for each ofthe first and second directions, whether the load on the motor duringthe strokes in the corresponding direction increases over the pluralityof cycles, if the load on the motor during the strokes in the firstdirection increases and the load on the motor during the strokes in thesecond direction remains substantially constant, associate the firstdirection with a power stroke and associating the second direction witha return stroke, if the load on the motor during the strokes in thesecond direction increases and the load on the motor during the strokesin the first direction remains substantially constant, associate thesecond direction with the power stroke and associating the firstdirection with the return stroke; and provide power to the linear motorhaving respective power output characteristics associated with the powerstroke and return stroke.
 7. The system of claim 6, wherein the electricdrive system generates power having a first phase rotation which causesthe mover to move in the first direction and power having a second phaserotation which causes the mover to move in the second direction; whereinif the electric drive system determines that the load on the motorduring the strokes in the first direction increases and the load on themotor during the strokes in the second direction remains substantiallyconstant, the electric drive system associates the first phase rotationwith the power stroke and associates the second phase rotation with thereturn stroke; wherein if the electric drive system determines that theload on the motor during the strokes in the second direction increasesand the load on the motor during the strokes in the first directionremains substantially constant, the electric drive system associates thesecond phase rotation with the power stroke and associates the firstphase rotation with the return stroke.
 8. The system of claim 6, whereinthe electric drive system determines the load on the motor during thestrokes in each of the first and second directions by determining acurrent drawn by the motor during the strokes in each of the first andsecond directions, wherein the load on the motor is proportional to thecurrent drawn by the motor.
 9. The system of claim 8, wherein, for eachof the first and second directions, the electric drive system determineswhether the current drawn by the motor during the strokes in thecorresponding direction increases over the plurality of cycles bycomparing the current for the stroke in the corresponding direction ineach successive one of the plurality of cycles.
 10. The system of claim6, wherein the electric drive system initially provides no power to themotor, and provides power to the motor in a startup phase of operation,wherein the electric drive system monitors the load on the motor for apredetermined number of cycles during the startup phase, and whereinafter the electric drive system monitors the load on the motor for thepredetermined number of cycles and associates each of the first andsecond directions is associated with the corresponding one of the powerand return strokes in the startup phase, the electric drive systemoperates the motor normally.
 11. An apparatus comprising: a controllerof an electric drive system for a linear motor, wherein in a startupphase of operation, the controller is configured to: control theelectric drive system which provides power to the linear motor, whereinthe power drives the motor for a plurality of cycles, wherein each cycleincludes a stroke in which a mover of the motor moves in a firstdirection and a stroke in which the mover moves in a second directionwhich is opposite the first direction; determine, for each of a firstplurality of strokes in the first direction and for each of a secondplurality of strokes in the second direction, a corresponding load onthe motor; determine whether the load on the motor corresponding tosuccessive ones of the first plurality of strokes increases; determinewhether the load on the motor corresponding to successive ones of thesecond plurality of strokes increases; if the load on the motorcorresponding to successive ones of the first plurality of strokesincreases and the load on the motor corresponding to successive ones ofthe second plurality of strokes remains substantially constant,associate the first direction with a power stroke and associate thesecond direction with a return stroke; if the load on the motorcorresponding to successive ones of the second plurality of strokesincreases and the load on the motor corresponding to successive ones ofthe first plurality of strokes remains substantially constant, associatethe second direction with a power stroke and associate the firstdirection with a return stroke; and provide power to the linear motorhaving respective power output characteristics associated with the powerstroke and return stroke.
 12. The apparatus of claim 11, wherein thecontroller is configured to determine whether the load on the motorcorresponding to the successive ones of the strokes increases bycomparing the loads corresponding to the successive ones of the strokes.13. The apparatus of claim 11, wherein the controller is configured to,after associating one of the first and second directions with the powerstroke and associating one of the first and second directions with thereturn stroke, provide power with a first set of power outputcharacteristics on the power stroke and provide power with a second,different set of power output characteristics on the return stroke. 14.The apparatus of claim 11, wherein associating each of the first andsecond directions with the corresponding one of the power stroke and thereturn stroke comprises storing corresponding data in a memory coupledto the controller.